<template>
	<div class='donate-model'>
		<component
			:is="steps[step]"
			@nextStep="nextStep"
			@close="$emit('close')"
		/>
	</div>
</template>

<script>
import Guide from './Guide'
import Upload from './Upload'
export default {
  components: {
    Guide,
    Upload,
  },
  data() {
    return {
      steps: ['Guide', 'Upload'],
      step: 0
    }
  },
  methods: {
    nextStep() {
      if (this.step < this.steps.length - 1) {
        this.step++
      } else {
        this.$emit('close')
      }
    }
  }
}
</script>
